package com.xiaozhichao.javaapi.designpattern.observer.model.java;

import java.util.Observable;
import java.util.Observer;

/**
 * 观察者
 */
public class User implements Observer {

    private String name;

    public User(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println(this.name + " 接收到 : " + arg);
    }
}
